<?php
/**
 * 
 * @author Paolo Bertuzzo
 *
 */
namespace User\Service;

use User\Data\CountryDao;
use User\Data\StateDao;

class CountryService
{

    /**
     */
    protected $countryDao;
    
    /**
     */
    protected $stateDao;
    
    /**
     * 
     * @param CountryDao $countryDao
     * @param StateDao $stateDao
     */
    public function __construct(CountryDao $countryDao, StateDao $stateDao)
    {
        $this->countryDao = $countryDao;
        $this->stateDao = $stateDao;
    }

    /**
     * 
     */
    public function getCountries()
    {
    	return $this->countryDao->get();
    }

    /**
     * 
     * @param integer $countryId
     */
    public function getCountryById($countryId)
    {
    	return $this->countryDao->getById($countryId);
    }
    
    /**
     *
     */
    public function getStates()
    {
    	return $this->stateDao->get();
    }
    
    /**
     * 
     * @param integer $stateId
     */
    public function getStateById($stateId)
    {
    	return $this->stateDao->getById($stateId);
    }
    
}

?>